//
//  TF_LivingAlertView.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/2/21.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

class TF_LivingAlertView: TalkfunHitTestView {
    //关注-弹窗
    @objc public let attentionView = TF_AttentionView()
    
    //商店宝贝
    @objc public let qrcodeStore = TF_AttentionView()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
       
        //TODO:弹窗关注
        self.attentionView.isHidden = true
        self.attentionView.backgroundColor = UIColor(red: 255/255.0, green: 255/255.0, blue: 255/255.0, alpha: 1.0)

        self.attentionView.layer.cornerRadius = 12
        self.addSubview(self.attentionView)


        self.qrcodeStore.tag = 999;
        self.qrcodeStore.isHidden = true
        self.qrcodeStore.backgroundColor = UIColor(red: 255/255.0, green: 255/255.0, blue: 255/255.0, alpha: 1.0)

        self.qrcodeStore.layer.cornerRadius = 12;
        self.addSubview(self.qrcodeStore)

        
    }
    

    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.attentionView.frame = CGRect(x: (self.frame.size.width - 220)/2, y: (self.frame.size.height - 220)/2, width: 220, height: 220)
        

        
        
        self.qrcodeStore.frame = self.attentionView.frame 
        
        
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
  
    
}
